﻿using Grow.Module.Builder;
using Grow.Module.Options;

namespace Grow.Domain.EventBus.CreateDomainEventBus
{
    public interface ICreateDomainEventBusBuilder : IBuilder
    {
        ICreateDomainEventBusBuilder AddDomainEventBus(Action<IOptionsBind, DomainEventBusOptions> domainEventBusOptionsAction);

        ICreateDomainEventBusBuilder AddDomainEvent<TDomainEvent>(Action<IOptionsBind, DomainEventOptions> domainEventOptionsAction) where TDomainEvent : IDomainEvent;

        ICreateDomainEventBusBuilder AddDomainEventHandler<TDomainEventHandler, TDomainEvent>(Action<IOptionsBind, DomainEventHandlerOptions> domainEventHandlerOptionsAction)
            where TDomainEventHandler : class, IDomainEventHandler<TDomainEvent>
            where TDomainEvent : IDomainEvent;
    }
}
